package com.crscd.ai.controller;

import org.springframework.ai.chat.model.ChatModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

import javax.naming.Name;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 10/9/25 2:48 PM
 * @modifiedBy:
 * @version: 1.0
 */
@RestController
public class NoToolCallingController {
  @Qualifier("qwen")
  @Autowired
  private ChatModel chatModel;

  @GetMapping("/notoolcall/chat")
  public Flux<String> chat(@RequestParam(name = "msg", defaultValue = "你是谁，现在几点了") String msg) {
    return chatModel.stream(msg);
  }
}
